<?php 
	
    $conn = oci_connect("hospital", "hospital", "//localhost/XE"); 
    $pull = oci_parse($conn, "select * from staff where stf_id = $_GET[col]");
    oci_execute($pull);
    $job = oci_fetch_array($pull,OCI_RETURN_LOBS );
    
            
  //  echo $name;
    
    if($job['JOB_TYPE'] == $_POST['job_type']){             //JOB_TYPE IS NOT CHANGE
         $ss = "UPDATE STAFF SET STF_ID = '$_POST[stf_id]', F_NAME = '$_POST[f_name]', L_NAME = '$_POST[l_name]', 
                JOB_TYPE = '$_POST[job_type]',SALARY ='$_POST[salary]', START_CONTACT = '$_POST[startcontract]', 
                END_CONTACT ='$_POST[endcontract]'
                WHERE STF_ID = '$_GET[col]' ";
		
	$update= oci_parse($conn,$ss);
	oci_execute($update);
        
            $que = "UPDATE FINACES SET ST_ID = '$_POST[stf_id]' 
                    WHERE ST_ID = '$_GET[col]' ";
        
	$updater= oci_parse($conn,$que);
	oci_execute($updater);
        
    }
    
	
 ?>
 
<html>
<head><meta http-equiv="refresh" content="5; URL=main.php"></head>
<BODY bgcolor = "#ffffff">
 <font color="#ffffff" size="20">Redirecting ...</font>
 </body>
 </html>
